package vn.anhqn.englishsentensetranslator.SentenseLookup;

import vn.anhqn.englishsentensetranslator.R;
import vn.anhqn.englishsentensetranslator.utils.BaseDialog;
import android.content.Context;
import android.view.View;

public class DialogDeleteCatAction extends BaseDialog implements android.view.View.OnClickListener {

	/*
	 * private HeverticalTextView tvDelete; private HeverticalTextView tvEdit;
	 * private HeverticalTextView tvCancel;
	 */
	ISelectTypeDelete actionListener;

	public DialogDeleteCatAction(Context context) {
		super(context);
	}

	public void setActionListener(ISelectTypeDelete actionListener) {
		this.actionListener = actionListener;
	}

	@Override
	protected int getLayoutResId() {
		return R.layout.dialog_delete_sentense_action;
	}

	@Override
	protected void onCreateContent(View pContentView) {
		findViewById(pContentView, R.id.tv_delete_select).setOnClickListener(this);
		findViewById(pContentView, R.id.tv_detete_cat).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		int idView = v.getId();
		switch (idView) {
		case R.id.tv_delete_select:
			if (actionListener != null)
				actionListener.onDeteteSelectDelete();
			dismiss();
			break;
		case R.id.tv_detete_cat:
			if (actionListener != null)
				actionListener.onDeleteCat();
			dismiss();
			break;

		case R.id.tv_cancel:
			dismiss();
			break;
		default:
			break;
		}
	}

	public interface ISelectTypeDelete {
		public void onDeteteSelectDelete();

		public void onDeleteCat();
	}

}
